package com.ssh.active;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.ssh.entity.UserEntity;
import com.ssh.service.UserService;


@Controller
@Scope("prototype")
public class UserAction {

	private UserEntity user;

	@Autowired
	private UserService userService;
	
	public String  add() {
		System.out.println(user);
		userService.add(user);
		return "success";
	}

	public void setUser(UserEntity user) {
		this.user = user;
	}

	public UserEntity getUser() {
		return user;
	}
	
	
	
}
